{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Kotlin\n",
    "\n",
    "[Kotlin](https://kotlinlang.org/) is a relative newcomer from [JetBrains](https://www.jetbrains.com/) and [Android](https://developer.android.com/kotlin/get-started.html).  It's intended to be an improved version of Java, including [Null Safety](https://kotlinlang.org/docs/reference/null-safety.html)."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "fun double(x: Int): Int {\n",
    "    return 2*x\n",
    "}\n",
    "val x = 23"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "\"hello, \" + double(3) + x"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "val numbers: MutableList<Number> = mutableListOf(1, 4, 3)\n",
    "val line = Line()\n",
    "line.setY(numbers)\n",
    "val plot = Plot()\n",
    "plot.setTitle(\"Kotlin Plotting\")\n",
    "plot.add(line)\n",
    "plot"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Kotlin",
   "language": "kotlin",
   "name": "kotlin"
  },
  "language_info": {
   "codemirror_mode": "kt",
   "file_extension": ".kt",
   "mimetype": "",
   "name": "Kotlin",
   "nbconverter_exporter": "",
   "version": "1.2.21"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
